Optimal. Leaf size=29 \[ \frac {i}{x}+2 i e^{-i a} \text {ArcTan}\left (e^{-i a} x\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 29, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.308, Rules used = {4591, 456, 464,
209} \begin {gather*} 2 i e^{-i a} \text {ArcTan}\left (e^{-i a} x\right )+\frac {i}{x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 209
Rule 456
Rule 464
Rule 4591
Rubi steps
\begin {align*} \int \frac {\tan (a+i \log (x))}{x^2} \, dx &=\int \frac {\tan (a+i \log (x))}{x^2} \, dx\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.03, size = 44, normalized size = 1.52 \begin {gather*} \frac {i}{x}+2 i \text {ArcTan}(x \cos (a)-i x \sin (a)) \cos (a)+2 \text {ArcTan}(x \cos (a)-i x \sin (a)) \sin (a) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.04, size = 24, normalized size = 0.83
method | result | size |
risch | \(\frac {i}{x}+2 i \arctan \left (x \,{\mathrm e}^{-i a}\right ) {\mathrm e}^{-i a}\) | \(24\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Both result and optimal contain complex but leaf count of result is larger than
twice the leaf count of optimal. 127 vs. \(2 (19) = 38\).
time = 0.52, size = 127, normalized size = 4.38 \begin {gather*} \frac {2 \, x {\left (-i \, \cos \left (a\right ) - \sin \left (a\right )\right )} \arctan \left (\frac {2 \, x \cos \left (a\right )}{x^{2} + \cos \left (a\right )^{2} - 2 \, x \sin \left (a\right ) + \sin \left (a\right )^{2}}, \frac {x^{2} - \cos \left (a\right )^{2} - \sin \left (a\right )^{2}}{x^{2} + \cos \left (a\right )^{2} - 2 \, x \sin \left (a\right ) + \sin \left (a\right )^{2}}\right ) + x {\left (\cos \left (a\right ) - i \, \sin \left (a\right )\right )} \log \left (\frac {x^{2} + \cos \left (a\right )^{2} + 2 \, x \sin \left (a\right ) + \sin \left (a\right )^{2}}{x^{2} + \cos \left (a\right )^{2} - 2 \, x \sin \left (a\right ) + \sin \left (a\right )^{2}}\right ) + 2 i}{2 \, x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 39 vs. \(2 (19) = 38\).
time = 2.84, size = 39, normalized size = 1.34 \begin {gather*} -\frac {{\left (x \log \left (x + i \, e^{\left (i \, a\right )}\right ) - x \log \left (x - i \, e^{\left (i \, a\right )}\right ) - i \, e^{\left (i \, a\right )}\right )} e^{\left (-i \, a\right )}}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.18, size = 27, normalized size = 0.93 \begin {gather*} \left (\log {\left (x - i e^{i a} \right )} - \log {\left (x + i e^{i a} \right )}\right ) e^{- i a} + \frac {i}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.47, size = 28, normalized size = 0.97 \begin {gather*} -\frac {2 \, \arctan \left (\frac {i \, x}{\sqrt {-e^{\left (2 i \, a\right )}}}\right )}{\sqrt {-e^{\left (2 i \, a\right )}}} + \frac {i}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 2.27, size = 27, normalized size = 0.93 \begin {gather*} \frac {\mathrm {atan}\left (\frac {x}{\sqrt {{\mathrm {e}}^{a\,2{}\mathrm {i}}}}\right )\,2{}\mathrm {i}}{\sqrt {{\mathrm {e}}^{a\,2{}\mathrm {i}}}}+\frac {1{}\mathrm {i}}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________